import request from '@/utils/request'

// 查询配置字段列表
export function listSpiderField(query) {
  return request({
    url: '/spider/spiderField/list',
    method: 'get',
    params: query
  })
}

// 查询配置字段详细
export function getSpiderField(fieldId) {
  return request({
    url: '/spider/spiderField/' + fieldId,
    method: 'get'
  })
}

// 新增配置字段
export function addSpiderField(data) {
  return request({
    url: '/spider/spiderField',
    method: 'post',
    data: data
  })
}

// 修改配置字段
export function updateSpiderField(data) {
  return request({
    url: '/spider/spiderField',
    method: 'put',
    data: data
  })
}

// 删除配置字段
export function delSpiderField(fieldId) {
  return request({
    url: '/spider/spiderField/' + fieldId,
    method: 'delete'
  })
}

// 导出配置字段
export function exportSpiderField(query) {
  return request({
    url: '/spider/spiderField/export',
    method: 'get',
    params: query
  })
}